package com.crowntit.infrastructure.dao;

import com.crowntit.infrastructure.dao.po.PayOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IOrderDao {
    void insert(PayOrder payOrder);

    PayOrder queryUnPayOrder(PayOrder payOrder);

    PayOrder queryPayOrderByOrderId(String orderId);

    List<PayOrder> queryOrdersByGbmOutTradeNos(@Param("gbmOutTradeNos") List<String> gbmOutTradeNos);

    void updateOrderPayUrlInfo(PayOrder payOrder);

    Integer updateOrderGroupBuyInfo(PayOrder payOrder);

    void changeOrderPaySuccess(PayOrder payOrder);

    void changeOrderGroupBuyStatus(PayOrder payOrder);

    List<String> queryTimeoutCloseOrder();

    List<String> queryNoPayNotifyOrder();

    boolean changeOrderClose(String orderId);

    Integer changeOrderDealDone(String orderId);

    Integer changeOrdersSuccessByGbmOutTradeNos(@Param("gbmOutTradeNoList") List<String> gbmOutTradeNoList);

    Integer changeOrdersCloseByGbmOutTradeNos(@Param("gbmOutTradeNoList") List<String> gbmOutTradeNoList);
}
